﻿using FreeSql.DatabaseModel;using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using Newtonsoft.Json;
using FreeSql.DataAnnotations;

namespace Unis.FMS.Platform.Order.Domain {

	[JsonObject(MemberSerialization.OptIn), Table(Name = "doc_dpt_task_package_additions", DisableSyncStructure = true)]
	public partial class DocDptTaskPackageAdditions {

		[JsonProperty, Column(Name = "id", DbType = "int", IsPrimary = true, IsIdentity = true)]
		public int Id { get; set; }

		/// <summary>
		/// 实际创建时间,客户端操作实际发生时间,UTC
		/// </summary>
		[JsonProperty, Column(Name = "actual_create_time", DbType = "datetime")]
		public DateTime ActualCreateTime { get; set; } = DateTime.Parse("1970-01-01 00:00:00");

		/// <summary>
		/// 实际更新时间,客户端操作实际发生时间,UTC
		/// </summary>
		[JsonProperty, Column(Name = "actual_update_time", DbType = "datetime")]
		public DateTime ActualUpdateTime { get; set; } = DateTime.Parse("1970-01-01 00:00:00");

		/// <summary>
		/// 创建人
		/// </summary>
		[JsonProperty, Column(Name = "create_user", StringLength = 50, IsNullable = false)]
		public string CreateUser { get; set; }

		/// <summary>
		/// 创建人
		/// </summary>
		[JsonProperty, Column(Name = "created_by", DbType = "int")]
		public int CreatedBy { get; set; } = 0;

		/// <summary>
		/// 创建时间
		/// </summary>
		[JsonProperty, Column(Name = "created_time", DbType = "datetime", InsertValueSql = "CURRENT_TIMESTAMP")]
		public DateTime CreatedTime { get; set; }

		[JsonProperty, Column(Name = "delivery_location", StringLength = 50, IsNullable = false)]
		public string DeliveryLocation { get; set; }

		/// <summary>
		/// 异常数据
		/// </summary>
		[JsonProperty, Column(Name = "exception_data", StringLength = 1000, IsNullable = false)]
		public string ExceptionData { get; set; }

		/// <summary>
		/// 异常原因
		/// </summary>
		[JsonProperty, Column(Name = "exception_reason", StringLength = 50, IsNullable = false)]
		public string ExceptionReason { get; set; }

		/// <summary>
		/// 文件尾缀 PDF PNG
		/// </summary>
		[JsonProperty, Column(Name = "file_extension", StringLength = 50, IsNullable = false)]
		public string FileExtension { get; set; }

		[JsonProperty, Column(Name = "file_name", StringLength = 50, IsNullable = false)]
		public string FileName { get; set; }

		/// <summary>
		/// 文件类型 Pod  
		/// </summary>
		[JsonProperty, Column(Name = "file_type", StringLength = 50, IsNullable = false)]
		public string FileType { get; set; }

		[JsonProperty, Column(Name = "file_url", IsNullable = false)]
		public string FileUrl { get; set; }

		/// <summary>
		/// 是否完成 0否 1是
		/// </summary>
		[JsonProperty, Column(Name = "is_complete", DbType = "tinyint")]
		public sbyte IsComplete { get; set; } = 0;

		/// <summary>
		/// 是否删除（0.正常 1.删除）;0.正常 1.删除
		/// </summary>
		[JsonProperty, Column(Name = "is_del", DbType = "int")]
		public int IsDel { get; set; } = 0;

		/// <summary>
		/// 是否异常 0否 1是
		/// </summary>
		[JsonProperty, Column(Name = "is_exception", DbType = "tinyint")]
		public sbyte IsException { get; set; } = 0;

		/// <summary>
		/// package id
		/// </summary>
		[JsonProperty, Column(Name = "package_id", DbType = "bigint")]
		public long PackageId { get; set; } = 0;

		/// <summary>
		/// tracking/pro_no + package_sequence+包裹号
		/// </summary>
		[JsonProperty, Column(Name = "package_no", StringLength = 50, IsNullable = false)]
		public string PackageNo { get; set; }

		/// <summary>
		/// package_sequence
		/// </summary>
		[JsonProperty, Column(Name = "sequence", DbType = "int")]
		public int Sequence { get; set; } = 0;

		/// <summary>
		/// do 单号
		/// </summary>
		[JsonProperty, Column(Name = "shipment_order_no", StringLength = 50, IsNullable = false)]
		public string ShipmentOrderNo { get; set; }

		/// <summary>
		/// task no
		/// </summary>
		[JsonProperty, Column(Name = "task_no", DbType = "bigint")]
		public long TaskNo { get; set; } = 0;

		/// <summary>
		/// tracking
		/// </summary>
		[JsonProperty, Column(Name = "tracking_no", StringLength = 50, IsNullable = false)]
		public string TrackingNo { get; set; }

		/// <summary>
		/// 更新人
		/// </summary>
		[JsonProperty, Column(Name = "update_by", DbType = "int")]
		public int UpdateBy { get; set; } = 0;

		/// <summary>
		/// 更新时间
		/// </summary>
		[JsonProperty, Column(Name = "update_time", DbType = "datetime", InsertValueSql = "CURRENT_TIMESTAMP")]
		public DateTime UpdateTime { get; set; }

		/// <summary>
		/// 修改人
		/// </summary>
		[JsonProperty, Column(Name = "update_user", StringLength = 50, IsNullable = false)]
		public string UpdateUser { get; set; }

	}

}
